package cn.walls1717.ggkt.vod.api;

import cn.walls1717.ggkt.result.Result;
import cn.walls1717.ggkt.vod.service.VodService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 前台腾讯视频点播相关接口
 *
 * @author walls1717
 * @since 2022/7/22
 **/
@Api(tags = "前台腾讯视频点播相关接口")
@RestController
@RequestMapping("/api/vod")
public class VodApiController {

    @Autowired
    private VodService vodService;

    @ApiOperation("视频点播")
    @GetMapping("getPlayAuth/{courseId}/{videoId}")
    public Result<Map<String, Object>> getPlayAuth(@PathVariable Long courseId, @PathVariable Long videoId) {
        Map<String, Object> map = vodService.getPlayAuth(courseId, videoId);
        return Result.success(map);
    }
}
